<template>
  <div>
    <div>我是A组件 {{ data }}</div>
    <AA></AA>
    <div><button @click="change">修改值</button></div>
  </div>
</template>

<script lang="ts" setup>
import { inject, ref } from "vue";
let data = inject("flag", ref(true));
const change = () => {
  data.value = !data.value;
};
</script>

<style>
</style>